﻿using System;
using log4net;

namespace Utils
{
	public static class ExceptionLogger
	{
		public static void LogException(string message, Exception exception, bool isFatal)
		{
			ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
			if (isFatal)
			{
				log.Fatal(message, exception);	
			}
			else
			{
				log.Error(message, exception);
			}
		}
	}
}
